/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function Deskpend(Number,List) {
   // console.log(Number);
   // var List = JSON.parse(window.localStorage.Lcatch);
   // console.log(List);
    var ul = d3.select(".one .ul" + Number);
    var W = d3.select(".one").style("width");
    W = +W.substr(0, W.length - 2) * 0.25;
    var H = d3.select(".one").style("height");
    H = +H.substr(0, H.length - 2) * 0.24;
    for (var i = 0, j = 0, k = 0; i < List["list"].length; i++) {
        if (List["list"][i].position && List["list"][i].position == "mbdesk" + Number) {
            var li = ul.append("li").classed("li", true).attr("data-index", List["list"][i].id)
                    .attr("data-url", List["list"][i].appURL)
                    .attr("data-key", i).style({
                "position": "absolute",
                left: (k % 4) * W + "px",
                top: Math.floor(k / 4) * H + 20 + "px"

            }).attr("x", (k % 4) * W).attr("y", Math.floor(k / 4) * H + 20);
            var x = li.append("p");
            x.html("<img src=../../common/page/images/" + List["list"][i].appImgUrl + " width=48 height=48>").append("br");
            x.append("span").html(List["list"][i].appCode);
//                    li
            k++;
        }
    }
  
}